<template>
	<el-row>
	  <el-col :span="24" :offset="1">
	
	<el-table :data="tableData" style="width: 80%" max-height="500" >
		<el-table-column fixed  label="图片" width="100">
			<template slot-scope="scope">
			          <el-image style="width: 50px; height: 50px" :src="scope.row.image" :preview-src-list="[scope.row.image]">
			            <div slot="error" class="image-slot">
			              <i class="el-icon-picture-outline"></i>
			            </div>
			          </el-image>
			 </template>
		</el-table-column>
		<el-table-column prop="productName" label="商品名" width="120">
		</el-table-column>
		<el-table-column prop="introduce" label="商品介绍" width="120">
		</el-table-column>
		<el-table-column prop="basePrice" label="起拍底价" width="100">
		</el-table-column>
		<el-table-column prop="price" label="成交价" width="100">
		</el-table-column>
		<el-table-column prop="address" label="收货地址" width="120">
		</el-table-column>
		<el-table-column prop="starttime" label="拍卖开始时间" width="120">
		</el-table-column>
		<el-table-column prop="deadline" label="拍卖结束时间" width="120">
		</el-table-column>
		<el-table-column prop="bond" label="保证金" width="120">
		</el-table-column>
		<el-table-column fixed="right" label="操作" width="120">
			<template slot-scope="scope">
				<el-button v-if="scope.row.orderStatus==1" @click.native.prevent="deleteRow(scope.$index, tableData)" type="text" size="small">
					立即支付尾款
				</el-button>
			</template>
		</el-table-column>
	</el-table>
	</el-col>
	</el-row>
</template>

<script>
	export default {
		methods: {
			deleteRow(index, rows) {
				rows.splice(index, 1);
			},
			getUnpaid(){
				this.$ax.get("epai/order/getUnpaidOrders",{params:{
					status:'2',
					uid:sessionStorage.getItem("uid")
				}}).then(resp=>{
					console.log(resp)
					this.tableData=resp.data.data
					console.log(this.tableData)
				})
			}
		},
		data() {
			return {
				tableData: []
			}
		},
		mounted() {
			this.getUnpaid()
		}
	}
</script>
